package com.xsd.vistor.shopDemo;

/**
 * @Description: 商品 书
 * @Author: zhoufuzong
 * @Created: 2021-03-10 21:36:47
 * @Version: 1.1.0
 */

public class Book extends ItemElement {
    private double price;
    private int number;

    public Book(double price, int number) {
        this.price = price;
        this.number = number;
    }

    public double getPrice() {
        return price;
    }

    public int getNumber() {
        return number;
    }

    @Override
    public double accpet(ShoppingCartVistor vistor) {
        return vistor.visitBook(this);
    }
}
